\hypertarget{classmiddleware_1_1Address}{
\section{middleware::Address Class Reference}
\label{classmiddleware_1_1Address}\index{middleware::Address@{middleware::Address}}
}


Represents a complete address for a peer.  




{\ttfamily \#include $<$address.hpp$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classmiddleware_1_1Address_aa062e22e7fb82352dca1e47ac89e3985}{Address} ()
\item 
\hyperlink{classmiddleware_1_1Address_aacba47174d6ff223890b85ed76b9b70a}{Address} (\hyperlink{namespacemiddleware_ac117dd2103801863d870e2ee58ec5779}{InetIpAddr} ip, \hyperlink{namespacemiddleware_a41f19ac55024737ec5b9d40def5f9c88}{InetPort} port, \hyperlink{namespacemiddleware_a41f19ac55024737ec5b9d40def5f9c88}{InetPort} port\_\-disc, \hyperlink{namespacemiddleware_a41f19ac55024737ec5b9d40def5f9c88}{InetPort} port\_\-w)
\item 
\hyperlink{classmiddleware_1_1Address_a257c0062bf2db2c41d2321b4dbe19bd7}{Address} (const \hyperlink{classmiddleware_1_1Address}{Address} \&addr)
\item 
\hyperlink{classmiddleware_1_1Address_a0dbb1b8fda6fd8dc0952038bfae82d39}{$\sim$Address} ()
\item 
\hyperlink{namespacemiddleware_ac117dd2103801863d870e2ee58ec5779}{InetIpAddr} \hyperlink{classmiddleware_1_1Address_a99422fe4a198dfb546e84b706bc170c2}{get\_\-ip} () const 
\item 
void \hyperlink{classmiddleware_1_1Address_a1a5e7abf903640f79fe03b23fa6fca52}{set\_\-ip} (\hyperlink{namespacemiddleware_ac117dd2103801863d870e2ee58ec5779}{InetIpAddr} ip)
\item 
\hyperlink{namespacemiddleware_a41f19ac55024737ec5b9d40def5f9c88}{InetPort} \hyperlink{classmiddleware_1_1Address_a81e2ef5e1647d618331031d59ea11292}{get\_\-port} () const 
\item 
\hyperlink{namespacemiddleware_a41f19ac55024737ec5b9d40def5f9c88}{InetPort} \hyperlink{classmiddleware_1_1Address_a76077caec832bfe2b629a6424e8454b4}{get\_\-port\_\-disc} () const 
\item 
\hyperlink{namespacemiddleware_a41f19ac55024737ec5b9d40def5f9c88}{InetPort} \hyperlink{classmiddleware_1_1Address_a1428ecb996e15d7900380aa617cc1026}{get\_\-port\_\-w} () const 
\item 
void \hyperlink{classmiddleware_1_1Address_a6b47f612c84d1aaaff5222e0997d8655}{set\_\-port} (\hyperlink{namespacemiddleware_a41f19ac55024737ec5b9d40def5f9c88}{InetPort} port)
\item 
void \hyperlink{classmiddleware_1_1Address_a5bf1fdfd3a43a92246d036b645acc36d}{set\_\-port\_\-disc} (\hyperlink{namespacemiddleware_a41f19ac55024737ec5b9d40def5f9c88}{InetPort} port)
\item 
void \hyperlink{classmiddleware_1_1Address_a4e61ee64bd7ee3c05bf24f582a08ea9d}{set\_\-port\_\-w} (\hyperlink{namespacemiddleware_a41f19ac55024737ec5b9d40def5f9c88}{InetPort} port)
\item 
bool \hyperlink{classmiddleware_1_1Address_aae60087ada8ff48b1d95a9eadcd21d5a}{operator==} (const \hyperlink{classmiddleware_1_1Address}{Address} \&addr) const 
\begin{DoxyCompactList}\small\item\em Comparison between two \hyperlink{classmiddleware_1_1Address}{Address}. \item\end{DoxyCompactList}\item 
bool \hyperlink{classmiddleware_1_1Address_a8b4de9bae41d323808cbfcd89e69c0cf}{operator!=} (const \hyperlink{classmiddleware_1_1Address}{Address} \&addr) const 
\begin{DoxyCompactList}\small\item\em Negative comparison between two \hyperlink{classmiddleware_1_1Address}{Address}. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classmiddleware_1_1Address_ac98d07dd8f7b70e16ccb9a01abf56b9c}{
class {\bfseries boost::serialization::access}}
\label{classmiddleware_1_1Address_ac98d07dd8f7b70e16ccb9a01abf56b9c}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Represents a complete address for a peer. \hyperlink{classmiddleware_1_1Address}{Address} embodies four important information of the peer regarding its location in the network: its Ip v4 address and its ports. A peer binds always to three ports: one for \hyperlink{classmiddleware_1_1Manager}{Manager}, one for \hyperlink{classmiddleware_1_1WorkerDiscovery}{WorkerDiscovery} and another one for \hyperlink{classmiddleware_1_1Worker}{Worker}. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classmiddleware_1_1Address_aa062e22e7fb82352dca1e47ac89e3985}{
\index{middleware::Address@{middleware::Address}!Address@{Address}}
\index{Address@{Address}!middleware::Address@{middleware::Address}}
\subsubsection[{Address}]{\setlength{\rightskip}{0pt plus 5cm}middleware::Address::Address (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_aa062e22e7fb82352dca1e47ac89e3985}
Constructs a private loopback address setting invalid ports (0). \hypertarget{classmiddleware_1_1Address_aacba47174d6ff223890b85ed76b9b70a}{
\index{middleware::Address@{middleware::Address}!Address@{Address}}
\index{Address@{Address}!middleware::Address@{middleware::Address}}
\subsubsection[{Address}]{\setlength{\rightskip}{0pt plus 5cm}middleware::Address::Address (
\begin{DoxyParamCaption}
\item[{{\bf InetIpAddr}}]{ ip, }
\item[{{\bf InetPort}}]{ port, }
\item[{{\bf InetPort}}]{ port\_\-disc, }
\item[{{\bf InetPort}}]{ port\_\-w}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_aacba47174d6ff223890b85ed76b9b70a}
Constructs an address basing on provided IP and ports. 
\begin{DoxyParams}{Parameters}
{\em ip} & An IP v4 address. \\
\hline
{\em port} & Port where \hyperlink{classmiddleware_1_1Manager}{Manager} listens to incoming \hyperlink{classmiddleware_1_1TaskDescriptor}{TaskDescriptor}. \\
\hline
{\em port\_\-disc} & Port where \hyperlink{classmiddleware_1_1WorkerDiscovery}{WorkerDiscovery} listens to incoming \hyperlink{classmiddleware_1_1WorkerDescriptor}{WorkerDescriptor}. \\
\hline
{\em port\_\-w} & Port where \hyperlink{classmiddleware_1_1Worker}{Worker} listens to incoming executable tasks' \hyperlink{classmiddleware_1_1Data}{Data}. \\
\hline
\end{DoxyParams}
\hypertarget{classmiddleware_1_1Address_a257c0062bf2db2c41d2321b4dbe19bd7}{
\index{middleware::Address@{middleware::Address}!Address@{Address}}
\index{Address@{Address}!middleware::Address@{middleware::Address}}
\subsubsection[{Address}]{\setlength{\rightskip}{0pt plus 5cm}middleware::Address::Address (
\begin{DoxyParamCaption}
\item[{const {\bf Address} \&}]{ addr}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_a257c0062bf2db2c41d2321b4dbe19bd7}
Copy constructor. \hypertarget{classmiddleware_1_1Address_a0dbb1b8fda6fd8dc0952038bfae82d39}{
\index{middleware::Address@{middleware::Address}!$\sim$Address@{$\sim$Address}}
\index{$\sim$Address@{$\sim$Address}!middleware::Address@{middleware::Address}}
\subsubsection[{$\sim$Address}]{\setlength{\rightskip}{0pt plus 5cm}middleware::Address::$\sim$Address (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_a0dbb1b8fda6fd8dc0952038bfae82d39}
Destructor 

\subsection{Member Function Documentation}
\hypertarget{classmiddleware_1_1Address_a99422fe4a198dfb546e84b706bc170c2}{
\index{middleware::Address@{middleware::Address}!get\_\-ip@{get\_\-ip}}
\index{get\_\-ip@{get\_\-ip}!middleware::Address@{middleware::Address}}
\subsubsection[{get\_\-ip}]{\setlength{\rightskip}{0pt plus 5cm}{\bf InetIpAddr} middleware::Address::get\_\-ip (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_a99422fe4a198dfb546e84b706bc170c2}
Gets the IP v4 address where the peer is located. \begin{DoxyReturn}{Returns}
Returns the InetIpAddr of the peer. 
\end{DoxyReturn}
\hypertarget{classmiddleware_1_1Address_a81e2ef5e1647d618331031d59ea11292}{
\index{middleware::Address@{middleware::Address}!get\_\-port@{get\_\-port}}
\index{get\_\-port@{get\_\-port}!middleware::Address@{middleware::Address}}
\subsubsection[{get\_\-port}]{\setlength{\rightskip}{0pt plus 5cm}{\bf InetPort} middleware::Address::get\_\-port (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_a81e2ef5e1647d618331031d59ea11292}
Gets the port where the \hyperlink{classmiddleware_1_1Manager}{Manager} listens to incoming \hyperlink{classmiddleware_1_1TaskDescriptor}{TaskDescriptor}. \begin{DoxyReturn}{Returns}
Returns the InetPort of where the \hyperlink{classmiddleware_1_1Manager}{Manager} is listening. 
\end{DoxyReturn}
\hypertarget{classmiddleware_1_1Address_a76077caec832bfe2b629a6424e8454b4}{
\index{middleware::Address@{middleware::Address}!get\_\-port\_\-disc@{get\_\-port\_\-disc}}
\index{get\_\-port\_\-disc@{get\_\-port\_\-disc}!middleware::Address@{middleware::Address}}
\subsubsection[{get\_\-port\_\-disc}]{\setlength{\rightskip}{0pt plus 5cm}{\bf InetPort} middleware::Address::get\_\-port\_\-disc (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_a76077caec832bfe2b629a6424e8454b4}
Gets the port where the \hyperlink{classmiddleware_1_1WorkerDiscovery}{WorkerDiscovery} listens to incoming \hyperlink{classmiddleware_1_1WorkerDescriptor}{WorkerDescriptor}. \begin{DoxyReturn}{Returns}
Returns the InetPort of where the \hyperlink{classmiddleware_1_1WorkerDiscovery}{WorkerDiscovery} is listening. 
\end{DoxyReturn}
\hypertarget{classmiddleware_1_1Address_a1428ecb996e15d7900380aa617cc1026}{
\index{middleware::Address@{middleware::Address}!get\_\-port\_\-w@{get\_\-port\_\-w}}
\index{get\_\-port\_\-w@{get\_\-port\_\-w}!middleware::Address@{middleware::Address}}
\subsubsection[{get\_\-port\_\-w}]{\setlength{\rightskip}{0pt plus 5cm}{\bf InetPort} middleware::Address::get\_\-port\_\-w (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_a1428ecb996e15d7900380aa617cc1026}
Gets the port where the \hyperlink{classmiddleware_1_1Worker}{Worker} listens to incoming \hyperlink{classmiddleware_1_1Data}{Data}. \begin{DoxyReturn}{Returns}
Returns the InetPort of where the \hyperlink{classmiddleware_1_1Worker}{Worker} is listening. 
\end{DoxyReturn}
\hypertarget{classmiddleware_1_1Address_a8b4de9bae41d323808cbfcd89e69c0cf}{
\index{middleware::Address@{middleware::Address}!operator!=@{operator!=}}
\index{operator!=@{operator!=}!middleware::Address@{middleware::Address}}
\subsubsection[{operator!=}]{\setlength{\rightskip}{0pt plus 5cm}bool middleware::Address::operator!= (
\begin{DoxyParamCaption}
\item[{const {\bf Address} \&}]{ addr}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_a8b4de9bae41d323808cbfcd89e69c0cf}


Negative comparison between two \hyperlink{classmiddleware_1_1Address}{Address}. 

Two \hyperlink{classmiddleware_1_1Address}{Address} are not equal when they have at least Ip or one port unequal. \hypertarget{classmiddleware_1_1Address_aae60087ada8ff48b1d95a9eadcd21d5a}{
\index{middleware::Address@{middleware::Address}!operator==@{operator==}}
\index{operator==@{operator==}!middleware::Address@{middleware::Address}}
\subsubsection[{operator==}]{\setlength{\rightskip}{0pt plus 5cm}bool middleware::Address::operator== (
\begin{DoxyParamCaption}
\item[{const {\bf Address} \&}]{ addr}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_aae60087ada8ff48b1d95a9eadcd21d5a}


Comparison between two \hyperlink{classmiddleware_1_1Address}{Address}. 

Two \hyperlink{classmiddleware_1_1Address}{Address} are equal when they have the same Ip and Ports. \hypertarget{classmiddleware_1_1Address_a1a5e7abf903640f79fe03b23fa6fca52}{
\index{middleware::Address@{middleware::Address}!set\_\-ip@{set\_\-ip}}
\index{set\_\-ip@{set\_\-ip}!middleware::Address@{middleware::Address}}
\subsubsection[{set\_\-ip}]{\setlength{\rightskip}{0pt plus 5cm}void middleware::Address::set\_\-ip (
\begin{DoxyParamCaption}
\item[{{\bf InetIpAddr}}]{ ip}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_a1a5e7abf903640f79fe03b23fa6fca52}
Sets the IP v4 address where the peer is located. 
\begin{DoxyParams}{Parameters}
{\em ip} & InetIpAddr to set. \\
\hline
\end{DoxyParams}
\hypertarget{classmiddleware_1_1Address_a6b47f612c84d1aaaff5222e0997d8655}{
\index{middleware::Address@{middleware::Address}!set\_\-port@{set\_\-port}}
\index{set\_\-port@{set\_\-port}!middleware::Address@{middleware::Address}}
\subsubsection[{set\_\-port}]{\setlength{\rightskip}{0pt plus 5cm}void middleware::Address::set\_\-port (
\begin{DoxyParamCaption}
\item[{{\bf InetPort}}]{ port}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_a6b47f612c84d1aaaff5222e0997d8655}
Sets the port where the \hyperlink{classmiddleware_1_1Manager}{Manager} listens to incoming \hyperlink{classmiddleware_1_1TaskDescriptor}{TaskDescriptor}. 
\begin{DoxyParams}{Parameters}
{\em port} & The InetPort where the \hyperlink{classmiddleware_1_1Manager}{Manager} will have to listen. \\
\hline
\end{DoxyParams}
\hypertarget{classmiddleware_1_1Address_a5bf1fdfd3a43a92246d036b645acc36d}{
\index{middleware::Address@{middleware::Address}!set\_\-port\_\-disc@{set\_\-port\_\-disc}}
\index{set\_\-port\_\-disc@{set\_\-port\_\-disc}!middleware::Address@{middleware::Address}}
\subsubsection[{set\_\-port\_\-disc}]{\setlength{\rightskip}{0pt plus 5cm}void middleware::Address::set\_\-port\_\-disc (
\begin{DoxyParamCaption}
\item[{{\bf InetPort}}]{ port}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_a5bf1fdfd3a43a92246d036b645acc36d}
Sets the port where the \hyperlink{classmiddleware_1_1WorkerDiscovery}{WorkerDiscovery} listens to incoming \hyperlink{classmiddleware_1_1WorkerDescriptor}{WorkerDescriptor}. 
\begin{DoxyParams}{Parameters}
{\em port} & The InetPort where the \hyperlink{classmiddleware_1_1WorkerDiscovery}{WorkerDiscovery} will have to listen. \\
\hline
\end{DoxyParams}
\hypertarget{classmiddleware_1_1Address_a4e61ee64bd7ee3c05bf24f582a08ea9d}{
\index{middleware::Address@{middleware::Address}!set\_\-port\_\-w@{set\_\-port\_\-w}}
\index{set\_\-port\_\-w@{set\_\-port\_\-w}!middleware::Address@{middleware::Address}}
\subsubsection[{set\_\-port\_\-w}]{\setlength{\rightskip}{0pt plus 5cm}void middleware::Address::set\_\-port\_\-w (
\begin{DoxyParamCaption}
\item[{{\bf InetPort}}]{ port}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classmiddleware_1_1Address_a4e61ee64bd7ee3c05bf24f582a08ea9d}
Sets the port where the \hyperlink{classmiddleware_1_1Worker}{Worker} listens to incoming \hyperlink{classmiddleware_1_1Data}{Data}. 
\begin{DoxyParams}{Parameters}
{\em port} & The InetPort where the \hyperlink{classmiddleware_1_1Worker}{Worker} will have to listen. \\
\hline
\end{DoxyParams}


The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
address.hpp\end{DoxyCompactItemize}
